import Mock from 'mockjs'

let getApi = {
  "algorithm_type/all": Mock.mock({
    "message": "",
    "data": [{
        "id": 1,
        "name": "face_search",
        "title": "人脸搜索",
        "enabled": 1,
        "sort": null
      },
      {
        "id": 2,
        "name": "crowd_overlimit",
        "title": "人群超限",
        "enabled": 1,
        "sort": null
      },
      {
        "id": 3,
        "name": "crowd_aggregation",
        "title": "人群聚集",
        "enabled": 1,
        "sort": null
      },
      {
        "id": 4,
        "name": "person_run",
        "title": "奔跑",
        "enabled": 1,
        "sort": null
      },
      {
        "id": 5,
        "name": "person_smoke_phone",
        "title": "抽烟打电话",
        "enabled": 1,
        "sort": 1
      },
      {
        "id": 6,
        "name": "person_car_hover",
        "title": "人车徘徊",
        "enabled": 1,
        "sort": null
      },
      {
        "id": 7,
        "name": "helmet_no_wear",
        "title": "未戴头盔",
        "enabled": 1,
        "sort": 2
      },
      {
        "id": 8,
        "name": "stairs_no_hold",
        "title": "未扶楼梯",
        "enabled": 1,
        "sort": null
      },
      {
        "id": 9,
        "name": "car_capture",
        "title": "车辆抓拍",
        "enabled": 1,
        "sort": null
      },
      {
        "id": 10,
        "name": "region_invade",
        "title": "区域入侵",
        "enabled": 1,
        "sort": null
      },
      {
        "id": 11,
        "name": "image_change",
        "title": "画面变化",
        "enabled": 1,
        "sort": null
      },
      {
        "id": 12,
        "name": "smoke_fire_detect",
        "title": "烟火检测",
        "enabled": 1,
        "sort": null
      },
      {
        "id": 13,
        "name": "steam_stop",
        "title": "冒气停止",
        "enabled": 1,
        "sort": null
      },
      {
        "id": 14,
        "name": "channel_block",
        "title": "通道占用",
        "enabled": 1,
        "sort": null
      },
      {
        "id": 15,
        "name": "belongings_left",
        "title": "物品滞留",
        "enabled": 1,
        "sort": null
      },
      {
        "id": 16,
        "name": "belongings_miss",
        "title": "物品遗失",
        "enabled": 1,
        "sort": null
      },
      {
        "id": 17,
        "name": "coal_interruption",
        "title": "断煤",
        "enabled": 1,
        "sort": null
      },
      {
        "id": 18,
        "name": "coal_overflow",
        "title": "漫煤",
        "enabled": 1,
        "sort": null
      },
      {
        "id": 19,
        "name": "fertilizer_overflow",
        "title": "漫肥",
        "enabled": 1,
        "sort": null
      }
    ],
    "status_code": 200,
    "page_index": 0,
    "page_count": 0,
    "count": 0
  }),
  "device/all": Mock.mock({
    "count": 10,
    "data|10": [{
      "access_params": "string",
      "access_type": 0,
      "create_time": 1625539837103,
      "device_group_id": 0,
      "device_id|+1": 0,
      "device_type": 0,
      "name": "像机1",
      "related_id": 0,
      "status_code": 0,
      "status_desc": "string",
      "update_time": 1625539837103,
      "url": "string"
    }],
    "message": "成功",
    "page_count": 1,
    "page_index": 1,
    "status_code": 200
  }),
  "device_group/all": Mock.mock({
    "count": 23,
    "data|22": [{
      "create_time": 1625539837103,
      "id|+1": 0,
      "name": "魅瞳-员工",
      "update_time": 1625539837103
    }],
    "message": "string",
    "page_count": 0,
    "page_index": 0,
    "status": 0,
    "status_code": 0
  }),
  "platform/all": Mock.mock({
    "message": "成功",
    "data|10": [{
      "create_time": 1623377501000,
      "update_time": 1623377952000,
      "id|+1": 1,
      "name": "HK-@title(2)",
      "type": null,
      "account": null,
      "secret": null,
      "ip": null,
      "port": null
    }],
    "status_code": 200,
    "page_index": 0,
    "page_count": 0,
    "count": 0
  }),
  "frame_unit/all": Mock.mock({
    "status": 0,
    "message": "",
    "data": [{
        "id": 1,
        "name": "秒"
      },
      {
        "id": 2,
        "name": "分"
      }
    ],
    "status_code": 200,
    "page_index": 0,
    "page_count": 0,
    "count": 0
  }),
  people_group: Mock.mock({
    "count": 24,
    "data|23": [{
      "create_time": 1625539837103,
      "id|+1": 0,
      "name": "魅瞳-员工",
      "update_time": 1625539837103
    }],
    "message": "成功",
    "page_count": 2,
    "page_index": 1,
    "status_code": 200
  }),
  function: Mock.mock({
    "count": 23,
    "data|22": [{
      "algorithm_id|+1": 1,
      "create_time": 1625539837103,
      "frame_count": 2,
      "frame_rate": 1,
      "frame_unit": 2,
      "id|+1": 0,
      "locked": 0,
      "name": "断煤状态-A方案",
      "params": "{}",
      "update_time": 1625539837103
    }],
    "message": "成功",
    "page_count": 2,
    "page_index": 1,
    "status_code": 200
  }),
  event: Mock.mock({
    "count": 61,
    "data|30": [{
        "alert_type": "string",
        "algorithm_id|+1": 0,
        "algorithm_title": "人脸匹配",
        "channel_id|+1": 0,
        "channel_name": "路口向西-抽烟行为",
        "create_time": 1625539837103,
        "detail": "{\"attr\":{\"glasses\":0,\"gender\":\"Male\",\"age\":24,\"race\":\"White\"}}",
        "device_id|+1": 0,
        "device_name": "1#锅炉给煤机",
        "frame": "@image('200x200', '#000', '#fff', 'png', '全景图')",
        "function_id|+1": 0,
        "function_name": "断煤状态-A方案",
        "id|+1": 0,
        "milvus_id": 0,
        "target_frame": "@image('200x200', '#000', '#fff', 'png', '目标截图')",
        "timestamp": 1625539837103,
        "update_time": 1625539837103
      },
      {
        "alert_type": "string",
        "algorithm_id": 9,
        "algorithm_title": "人脸匹配",
        "channel_id|+1": 0,
        "channel_name": "路口向西-抽烟行为",
        "create_time": 1625539837103,
        "detail": "{\"frame\":\"@image('100x100', '#000', '#fff', 'png', '车辆截图')\",\"plate\":{\"name\":\"车牌号\",\"color\":\"白色\",\"frame\":\"@image('200x100', '#000', '#fff', 'png', '车牌截图')\"}}",
        "device_id|+1": 0,
        "device_name": "1#锅炉给煤机",
        "frame": "@image('200x200', '#000', '#fff', 'png', '全景图')",
        "function_id|+1": 0,
        "function_name": "断煤状态-A方案",
        "id|+1": 0,
        "milvus_id": 0,
        "target_frame": "@image('200x200', '#000', '#fff', 'png', '目标截图')",
        "timestamp": 1625539837103,
        "update_time": 1625539837103
      }
    ],
    "message": "成功",
    "page_count": 2,
    "page_index": 1,
    "status_code": 200
  }),
  event_match: Mock.mock({
    "count": 31,
    "data|15": [{
        "alert_type": "string",
        "algorithm_id|+1": 0,
        "algorithm_title": "人脸匹配",
        "channel_id|+1": 0,
        "channel_name": "路口向西-抽烟行为",
        "create_time": 1625539837103,
        "detail": "{\"attr\":{\"glasses\":0,\"gender\":\"Male\",\"age\":24,\"race\":\"White\"},\"suspects\":[{\"id\":0,\"similarity\":0.5,\"person\":{\"id\":0,\"name\":\"XXX\",\"image\":\"@image('200x200', '#000', '#fff', 'png', '照片')\",\"identity\":\"42108812341234123410\",\"phone\":\"15512341234\",\"people_group\":{\"id\":0,\"name\":\"XXXX\"},\"description\":\"\",\"external_id\":0}}]}",
        "device_id|+1": 0,
        "device_name": "1#锅炉给煤机",
        "frame": "@image('200x200', '#000', '#fff', 'png', '全景图')",
        "function_id|+1": 0,
        "function_name": "断煤状态-A方案",
        "id|+1": 0,
        "milvus_id": 0,
        "target_frame": "@image('200x200', '#000', '#fff', 'png', '目标截图')",
        "timestamp": 1625539837103,
        "update_time": 1625539837103,
      },
      {
        "alert_type": "string",
        "algorithm_id": 10,
        "algorithm_title": "人脸匹配",
        "channel_id|+1": 0,
        "channel_name": "路口向西-抽烟行为",
        "create_time": 1625539837103,
        "detail": "{\"frame\":\"@image('100x100', '#000', '#fff', 'png', '车辆截图')\",\"plate\":{\"name\":\"车牌号\",\"color\":\"白色\",\"frame\":\"@image('200x100', '#000', '#fff', 'png', '车牌截图')\"},\"suspects\":[{\"id\":0,\"similarity\":0.5,\"person\":{\"id\":0,\"name\":\"XXX\",\"image\":\"@image('200x200', '#000', '#fff', 'png', '照片')\",\"identity\":\"42108812341234123410\",\"phone\":\"15512341234\",\"people_group\":{\"id\":0,\"name\":\"XXXX\"},\"description\":\"\",\"external_id\":0}}]}",
        "device_id|+1": 0,
        "device_name": "1#锅炉给煤机",
        "frame": "@image('200x200', '#000', '#fff', 'png', '全景图')",
        "function_id|+1": 0,
        "function_name": "断煤状态-A方案",
        "id|+1": 0,
        "milvus_id": 0,
        "target_frame": "@image('200x200', '#000', '#fff', 'png', '目标截图')",
        "timestamp": 1625539837103,
        "update_time": 1625539837103
      }
    ],
    "message": "成功",
    "page_count": 2,
    "page_index": 1,
    "status_code": 200
  }),
  channel: Mock.mock({
    "count": 31,
    "data|22": [{
      "algorithm_id|+1": 1,
      "algorithm_title": "人脸匹配",
      "create_time": 1625539837103,
      "device_id": 1,
      "device_name": "1#锅炉给煤机",
      "enabled": 1,
      "extra": "string",
      "function_id|+1": 1,
      "function_name": "string",
      "id": 1,
      "name": "路口向西-抽烟行为",
      "record_enabled": 0,
      "roi": "[[[129,41],[206,39],[197,110],[110,89]],[[152,34],[250,39],[203,89]]]",
      "schedule_id": null,
      "status_code": 0,
      "status_desc": "停用",
      "update_time": 1625539837103
    }],
    "message": "成功",
    "page_count": 2,
    "page_index": 1,
    "status_code": 200
  }),
  device_group: Mock.mock({
    "count": 23,
    "data|22": [{
      "create_time": 1625539837103,
      "id|+1": 0,
      "name": "新厂区-办公区域",
      "update_time": 1625539837103
    }],
    "message": "成功",
    "page_count": 2,
    "page_index": 1,
    "status_code": 200
  }),
  log: Mock.mock({
    "count": 23,
    "data|22": [{
      "account": "账号123456",
      "action": "删除",
      "id|+1": 0,
      "ip": "192.168.1.1",
      "target": "管理中心-人员分组-来访人员",
      "timestamp": 1625539837103,
      "username": "张三"
    }],
    "message": "成功",
    "page_count": 2,
    "page_index": 1,
    "status_code": 200
  }),
  device: Mock.mock({
    "count": 23,
    "data|22": [{
      "access_params": "{}",
      "access_type|+1": 0, // 接入类型
      "create_time": 1625539837103,
      "device_group_id|+1": 0, // 设备分组id
      "device_id|+1": 0, // 设备id
      "device_type|+1": 0, // 设备类型
      "edge_device_name": "边缘设备名称-@title(2)",
      "name": "设备名称-@title(2)",
      "params_name": "从传输参数中提取的名称，如录像数据参数，未使用",
      "platform_name": "第三方平台名称-@title(2)",
      "related_id|+1": 0,
      "status_code": 0,
      "status_desc": "错误消息",
      "update_time": 1625539837103,
      "url": "不同设备类型表示的含义不一样",
      "video": {
        "analysis_status": 0, // 分析状态, 0 排队中， 1 已完成, 2 失败， 3 正在进行 暂时未使用
        "create_time": 1625539837103,
        "filename": "文件名称-@title(2).MP4",
        "hash": "文件hash字符串",
        "id|+1": "@id",
        "length": 60000,
        "size": 2024, // 文件大小
        "update_time": 1625539837103,
        "url": "文件url"
      }
    }],
    "message": "成功",
    "page_count": 2,
    "page_index": 1,
    "status_code": 200
  }),
  remote_device: Mock.mock({
    "count": 10,
    "data|10": [{
      "name": "设备名称-@title(2)",
      "uuid": "@id",
      "binding|1-2": true,
    }],
    "message": "成功",
    "page_count": 0,
    "page_index": 0,
    "status_code": 200
  }),
  "people_group/all": Mock.mock({
    "count": 10,
    "data|10": [{
      "create_time": 1625539837103,
      "id|+1": 0,
      "name": "魅瞳-@title(2)",
      "update_time": 1625539837103
    }],
    "message": "成功",
    "page_count": 0,
    "page_index": 0,
    "status": 0,
    "status_code": 200
  }),
  "people/list": Mock.mock({
    "count": 12,
    "data|11": [{
      "create_time": 1625539837103,
      "description": "描述",
      "external_id": "",
      "face": "",
      "id|+1": 0,
      "identity": "421019778245136541",
      "image": "@image('200x200', '#000', '#fff', 'png', '人员')",
      "name": "@ctitle(4)",
      "people_group_id": "@id",
      "phone": "15810001000",
      "update_time": 1625539837103
    }],
    "message": "成功",
    "status": 0,
    "status_code": 200
  }),
  "platform/list": Mock.mock({
    "count": 23,
    "data|22": [{
      "account": "@ctitle(4)",
      "create_time": 1625539837103,
      "id": "@id",
      "ip": "192.1.1.1",
      "name": "@ctitle(4)",
      "port": 8000,
      "secret": "123456",
      "type": "hik",
      "update_time": 1625539837103
    }],
    "message": "string",
    "status": 0,
    "status_code": 200
  }),
  "platform_type": Mock.mock({
    "status": 0,
    "message": "",
    "data": [{
        "id": 1,
        "name": "hik"
      },
      {
        "id": 2,
        "name": "gb"
      }
    ],
    "status_code": 200,
    "page_index": 0,
    "page_count": 0,
    "count": 0
  }),
  "function/all": Mock.mock({
    "status": 0,
    "message": "",
    "data|10": [{
      "create_time": 1627548063000,
      "update_time": 1627550331000,
      "id|+1": 0,
      "name": "奔跑-@ctitle(2)",
      "algorithm_id": 7,
      "frame_count": 1,
      "frame_rate": 1,
      "frame_unit": 1,
      "params": "{\"threshold\": 60}",
      "locked": null
    }, ],
    "status_code": 200,
    "page_index": 0,
    "page_count": 0,
    "count": 0
  }),
}

export default getApi;